package com.gym.myshop.common;

/**
 * @author ming
 * 2021/11/4
 * description:常量
 */
public interface Const {


    /**
     *@author:ming
     *@Date: 2021/11/7
     *@description:订单
     */
    interface OrderCode {
        //未付款
        int NOT_PAY = 0;
        //已经付款未发货
        int IS_PAY = 1;
        //发货待收货
        int IS_SEND = 2;
        //收货待评价
        int NOT_COMMENT = 3;
        //订单完成
        int IS_DONE = 4;
        //退货状态
        int IS_RETURN = 5;
    }

    /**
     *@author:ming
     *@Date: 2021/11/4
     *@description:用户判断
     */
    //用户名存在
    String SUCCESS = "0";
    //用户名不存在
    String FAIL = "1";

    /**
     *@author:ming
     *@Date: 2021/11/4
     *@description:系统相关的常量
     */
    //转发
    String FORWARD = "forward:";
    //重定向
    String REDIRECT = "redirect:";
    //验证码
    String VALI_CODE = "vali_code";


    /**
     *@author:ming
     *@Date: 2021/11/4
     *@description:用户相关的常量
     */
    interface UserConst {
        //激活
        int ACTIVATE = 1;
        //未激活
        int NOT_ACTIVATE = 0;
        //登录
        String IS_LOGIN = "is_login";
        //自动登录
        String AUTO_LOGIN="auto_login";
    }

    /**
     *@author:ming
     *@Date: 2021/11/4
     *@description:枚举(说明用) 方便管理
     */
    enum ResultCode {
        SUCCESS(10, "success"), FAIL(20, "fail");
        int code;
        String msg;

        ResultCode(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

}
